<?php
    if (isset($_POST['nome'])) {
        setcookie('meucookie', $_POST['nome'], time() + 3600);
    }
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
    <head>
        <title>Cookie Lendo e Apagando</title>
    </head>
    <body>
        <p>Utilizando Cookie</p>
        <form action="" method="post">
            <label for="nome">Nome</label>
            <input type="text" name="nome" />
            <input type="submit" value="Enviar" />
        </form>
        <a href="lendocookie.php">Ler o Cookie</a>
        <a href="apagandocookie.php">Apagando o Cookie</a>
    </body>
</html>